package ltd.dujiabao.mybatisplus.pojo;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * @author : DuJiabao
 * @Project : mybatisplus
 * @Time : 2021/4/16 16:31
 * @Desc :
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class User {
  @TableId(type = IdType.NONE)
  private Long id;

  private String name;

  private Integer age;

  private String email;

  @TableField(fill = FieldFill.INSERT)
  private LocalDateTime createTime;

  @TableField(fill = FieldFill.INSERT_UPDATE)
  private LocalDateTime updateTime;

  @Version
  @TableField(fill = FieldFill.INSERT)
  private Integer version;

  @TableLogic
  @TableField(fill = FieldFill.INSERT)
  private Integer deleted;
}
